IF EXISTS ( SELECT  *
            FROM    dbo.sysobjects
            WHERE   id = OBJECT_ID(N'CGO_PaymentLog')
                    AND OBJECTPROPERTY(id, N'IsTable') = 1 ) 
  BEGIN
    DROP TABLE dbo.CGO_PaymentLog
  END


CREATE TABLE [dbo].[CGO_PaymentLog]
  (
    [PaymentLogID] [int] NOT NULL IDENTITY(1, 1) ,
    [PaymentID] [int] NULL,
    [AppID] [nvarchar] (100) NULL,
    [ProductKey] [nvarchar] (100) NULL,
    [ProductQuantity] [int] NULL,
    [TransactionID] [nvarchar] (100) NULL,
    [TransType] [nvarchar] (100) NULL,    
    [ApprovalCode] [nvarchar] (100) NULL,
    [IsTest] [bit] NULL,
    [PageNumber] [nvarchar] (100) NULL,    
    [ReceiptNumber] [nvarchar] (255) NULL,
    [SalesOrderNumber] [nvarchar] (255) NULL
  )
ON
  [PRIMARY]
GO
ALTER TABLE [dbo].[CGO_PaymentLog] ADD CONSTRAINT [PK_CGO_PaymentLog] PRIMARY KEY CLUSTERED  ([PaymentLogID]) ON [PRIMARY]
GO